package io.unicorn.modules.water.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.unicorn.common.utils.PageUtils;
import io.unicorn.common.utils.Query;

import io.unicorn.modules.water.dao.WaterdeptDao;
import io.unicorn.modules.water.entity.WaterdeptEntity;
import io.unicorn.modules.water.service.WaterdeptService;


@Service("waterdeptService")
public class WaterdeptServiceImpl extends ServiceImpl<WaterdeptDao, WaterdeptEntity> implements WaterdeptService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<WaterdeptEntity> page = this.page(
                new Query<WaterdeptEntity>().getPage(params),
                new QueryWrapper<WaterdeptEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<WaterdeptEntity> queryWaterDept(Map<String, Object> map) {
        return baseMapper.queryWaterDept(map);
    }

    @Override
    public List<WaterdeptEntity> queryWaterDeptAll(Map<String, Object> map) {
        return baseMapper.queryWaterDeptAll(map);
    }

    @Override
    public List<WaterdeptEntity> queryDeptCityAreaUnit(Map<String, Object> map) {
        return baseMapper.queryDeptCityAreaUnit(map);
    }

    @Override
    public List<WaterdeptEntity> queryDeptUnitSubWater(Long deptId) {
        return baseMapper.queryDeptUnitSubWater(deptId);
    }

    @Override
    public List<WaterdeptEntity> queryWaterDeptAllSubWater(Long deptId) {
        return baseMapper.queryWaterDeptAllSubWater(deptId);
    }

    @Override
    public List<WaterdeptEntity> queryDeptUnitAlertSubWater(Long deptId) {
        return baseMapper.queryDeptUnitAlertSubWater(deptId);
    }

    @Override
    public List<WaterdeptEntity> queryWaterDeptTreeFgs(String areaId) {
        return baseMapper.queryWaterDeptTreeFgs(areaId);
    }

    @Override
    public List<WaterdeptEntity> queryDeptUnitErrTreeFgs(String areaId) {
        return baseMapper.queryWaterUnitErrTreeFgs(areaId);
    }

}
